import React from 'react'
import Vshow2 from '../src/components/Vshowchild'

class App extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            falg:true
        }
    }

    toggle(flag){
        var isshow = !flag 
        this.setState({
            flag:isshow
        })
    }


    render(){
        return (
            <div>
                <button
                    onClick={this.toggle.bind(this,this.state.flag)}
                >点击切换v-show</button>

                < Vshow2
                v-show ={this.state.flag}
                name='cluo'></Vshow2>
            </div>
        )
    }


}


export default App